<p:dialog xmlns="http://www.w3.org/1999/xhtml"
      	  xmlns:h="http://java.sun.com/jsf/html"
      	  xmlns:f="http://java.sun.com/jsf/core"
      	  xmlns:ui="http://java.sun.com/jsf/facelets"
      	  xmlns:p="http://primefaces.org/ui"
      	  modal="true"  resizable="true" width="40%"
		  widgetVar="dialogConsultarAluno" id="idDialogConsultarAluno" closable="true"
		  appendToBody="true" header="Consultar Aluno"> 	
  	
	 <link rel="stylesheet" type="text/css" href="./estilos.css"/>  
<h:form id="formDialogConsultarAluno" prependId="false">
<h:panelGroup id="pgDialogConsultarAluno">

 	<p:messages id="messagesCRConsultarAluno" autoUpdate="true" closable="true" />
    	<h:panelGrid columns="3" style="margin-right:10%;">  
            <h:outputLabel value="Código" styleClass="outputLabel"/>  
            <h:outputLabel value="Aluno" styleClass="outputLabel"/> 
            <h:outputLabel />
            <p:inputText value="#{contaReceberBean.aluno.idAluno}" styleClass="inputId"/>  
  			<p:inputText value="#{contaReceberBean.aluno.nome}" styleClass="inputDescricao"/>  
  			<p:commandButton value="Consultar" actionListener="#{contaReceberBean.findAluno}" process="@this" update="dataTableAluno" styleClass="commandButton" /> 
        </h:panelGrid>  
    <p:dataTable id="dataTableAluno" var="Aluno" value="#{contaReceberBean.dmAluno}"  
    			 rowKey="#{Aluno.idAluno}"  selectionMode="single" style="padding-top:20px;" paginator="true" rows="10" >  
		<p:column style="width:4%; text-align:center">  
            <f:facet name="header">  
                <h:outputText value="Código" />  
            </f:facet>  
            <h:outputText value="#{Aluno.idAluno}" />  
        </p:column>  
  
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="Nome do Aluno" />  
            </f:facet>  
            <h:outputText value="#{Aluno.nome}" />  
        </p:column>  
        <p:column >  
            <f:facet name="header">  
                <h:outputText value="Email" />  
            </f:facet>  
            <h:outputText value="#{Aluno.email}" />  
        </p:column> 
        
        <p:column style="width:4%; text-align:center">  
        	<f:facet name="header">
        	 <h:outputText value="Adicionar" />
        	</f:facet>
         	<p:commandButton id="selectButtonEditar" actionListener="#{contaReceberBean.selectAluno}" process="@this"  icon="ui-icon-circle-plus" title="Add" />
        </p:column> 
    </p:dataTable> 
 </h:panelGroup>
 </h:form>
</p:dialog>
